package com.znf4.ad.server.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.znf4.ad.entity.Ad;
import com.znf4.ad.mapper.AdMapper;
import com.znf4.ad.server.AdServer;

@Service
public class AdServerImpl implements AdServer {
	
	@Autowired
	private AdMapper adMapper ;

	public void addAd(Ad ad) {
		adMapper.insert(ad);
		
	}

	public void updateAd(Ad ad) {
		adMapper.update(ad);
		
	}

	public void delOneAd(Ad ad) {
		adMapper.deleteOne(ad);
		
	}

	public void delAllAd(List<Ad> list) {
		adMapper.deleteAll(list);
		
	}

	public Ad queryOne(Ad ad) {
		return adMapper.queryOne(ad);
	}

	public List<Ad> queryAll(Ad ad) {
		return adMapper.queryAll(ad);
	}
	
	
	
	
	

}
